﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
    namespace="KojackGames.Blackjack.Acceptance.Tests.Utilities.TableObjects"
        assembly="KojackGames.Blackjack.Acceptance.Tests">

  <class name="HandTableRow" table="Hands" lazy="false" >

    <id name="id" type="Guid">
    </id>
    
    <version name="version" unsaved-value="0" />

    <property name="discriminator"/>        
    <property name="state_id"/>
    <property name="turn_ended"/>
    <property name="state_name"/>
    <property name="is_active"/>
    <property name="bet"/>
    <property name="hand_letter"/>

    <bag name="card_in_hand_rows" table="CardsInHand" lazy="false">
      <key column="hand_id"/>
      <composite-element class="KojackGames.Blackjack.Acceptance.Tests.Utilities.TableObjects.CardInHandRow, KojackGames.Blackjack.Acceptance.Tests">        
        <property name="suit"/>
        <property name="card_value"/>
        <property name="name" />
        <property name="is_hidden"/>
      </composite-element>
    </bag>
    
    <many-to-one name="blackjacktable"
                 class="BlackJackTableRow"
                 column="blackjack_table_id"
                 not-null="true"/>         
  </class>

</hibernate-mapping>